FROM golang:1.17.1 AS build

COPY . /cncamp

WORKDIR /cncamp

RUN mkdirCGO_ENABLED=0  GOOS=linux go build  -ldflags="-w -s" -o bin/httpserver ./pkg/w1/

FROM alpine

COPY --from=build /cncamp/bin/httpserver .

ENV version=1.0.0

EXPOSE 8000

ENTRYPOINT ["./httpserver"]